CygNet Studio Profiling

CygNet Studio profiling allows screen designers the option to assist in troubleshooting events or calls from within a CygNet Studio screen via script. A LogManager Object allows items to be logged when they come in or out of scope.

Adding these scripting options to CygNet Studio screens gives administrators the option to enable logging to aid in troubleshooting screen performance. Screens can have minimal logging enabled to capture basic data and then the logging mode can be increased if troubleshooting a particular item is needed. Screen designers can also use these methods to assist in finding out what scripts or calls are running inefficiently in order to improve screen performance during initial screen development. For example, the start and stop times of items coming in and out of scope could show the amount of time it takes to run a process.

LogManager Methods

The LogManager Object is used to manage CygNet Studio log files via script. All log messages will include the HyperPoint Name in the message string to identify the HyperPoint that generated it. See LogManager Methods for more information.

When editing existing script functions on CygNet Studio screens, enter one or more option(s) from the table below to invoke tracing line items to be logged. Enabling LogAll, LogMin, or LogMax settings will allow Studio log files to trace when an item comes in or out of scope. The GetProfiler option logs a timing message showing the duration of time it takes for a process or thread to execute, using the beginning and ending timestamps.

LogManager Method Description

LogManager.GetProfiler("message")

The GetProfiler method writes a profile message to the scripting log file. Returns an object that logs a profile timing message on creation and deletion (object goes in or out of scope). On creation PROFILE_MAX must be set and on deletion (object goes out of scope) PROFILE_MIN must be set.

LogManager.LogAll("message")

The LogAll method writes the message string to the scripting log file.

LogManager.LogMin("message")

The LogMin method writes the message string to the scripting log file if MIN_TRACE is set in the HSS service configuration file.

LogManager.LogMax("message")

The LogMax method writes the message string to the scripting log file if MAX_TRACE is set in the HSS service configuration file.

Enabling CygNet Studio Profiling

After the CygNet Studio screen has the appropriate LogManager methods entered into the script sections to be logged, close all Studio windows and open a command prompt. Type the path C:\CygNet\Clients\cstudio, and add the appropriate command-line options from the table below to enable the desired log profiling. Options are available to enable single log parameters or can be used in combination to display multiple logging options in the log files.

Logging Parameters

Description

/LOG_ALL

Logs all entries defined by the LogManager.LogAll script methods. Displays all logged items or events for the Studio screen.

/LOG_MIN_TRACE

Logs only entries defined by the LogManager.LogMin script methods. The log entries are defined when an item comes out of scope or a thread ends. Allows CygNet Studio screens to be created initially with logging script functions but not invoked every time a screen is run.

/LOG_MAX_TRACE

Logs only entries defined by the LogManager.LogMax script methods. The log entries are defined when the start of a process is executed or a thread begins. Allows CygNet Studio screens to be created initially with logging script functions but not invoked every time a screen is run.

/LOG_PROFILE_MIN

Logs the duration or amount of time it takes for a process to run. Creates a time entry when a process or thread ends or runs out of scope.

/LOG_PROFILE_MAX

Creates an entry when a thread or process begins to run or comes in scope.

CygNet Studio and CygNet Vision Log Files

The log files for the events used to capture and display the output of the data collected are held in the CygNet\Clients directory. Log files can be viewed by double clicking on the log file.

CygNet also has a utility that is designed to ease the view of displaying items in a log file. The Log File Viewer utility, located in the CygNet\Utilities directory, allows you to open, print, and search/filter for data within any log file to assist or aid in troubleshooting.

Back to top